Optimal. Leaf size=38 \[ -\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {\cos (c+d x)}{d (a+a \sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2826, 3855,
2727} \begin {gather*} \frac {\cos (c+d x)}{d (a \sin (c+d x)+a)}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2826
Rule 3855
Rubi steps
\begin {align*} \int \frac {\csc (c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int \csc (c+d x) \, dx}{a}-\int \frac {1}{a+a \sin (c+d x)} \, dx\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {\cos (c+d x)}{d (a+a \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 48, normalized size = 1.26 \begin {gather*} -\frac {\sec (c+d x) \left (-1+\tanh ^{-1}\left (\sqrt {\cos ^2(c+d x)}\right ) \sqrt {\cos ^2(c+d x)}+\sin (c+d x)\right )}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 34, normalized size = 0.89
method | result | size |
derivativedivides | \(\frac {\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(34\) |
default | \(\frac {\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(34\) |
norman | \(-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}\) | \(49\) |
risch | \(\frac {2}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d a}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d a}\) | \(63\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 51, normalized size = 1.34 \begin {gather*} \frac {\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {2}{a + \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 97 vs.
\(2 (38) = 76\).
time = 0.34, size = 97, normalized size = 2.55 \begin {gather*} -\frac {{\left (\cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (\cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, \cos \left (d x + c\right ) + 2 \, \sin \left (d x + c\right ) - 2}{2 \, {\left (a d \cos \left (d x + c\right ) + a d \sin \left (d x + c\right ) + a d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\csc {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 6.06, size = 38, normalized size = 1.00 \begin {gather*} \frac {\frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} + \frac {2}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.21, size = 39, normalized size = 1.03 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {2}{a\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________